# -*- coding: utf-8 -*-
all = [
       
    'ajax_only',
    'auth_only'
]

'''

Decorators to use some things with more 
beautifull way
#Testing commit

'''


def ajax_only(func):
  def wrapper(*args, **kwards):
      req = args[0]      
      if req.ajax: 
          return func(*args, **kwards)
  
  return wrapper
  

def auth_only(func):
  def wrapper(*args, **kwards):
      req = args[0]      
      if req.session['user_auth']: 
          return func(*args, **kwards)
  
  return wrapper






